class Solution {
public:
    vector<int> numberGame(vector<int>& nums) {
        vector<int>ans;
        priority_queue<int, vector<int>, greater<int>>q;
        for (auto x : nums) {
            q.push(x);
        }
        while (q.size()) {
            int t1 = q.top();
            q.pop();
            int t2 = q.top();
            q.pop();
            ans.push_back(t2);
            ans.push_back(t1);
        }
        return ans;
    }
};